﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ParserCombinatorLibrary
{
    public class ParserInput<TToken>
    {
        public TToken[] Tokens { get; set; }
        public int CurrentPosition { get; set; }
    }

    public class ParserOutput<TNode>
    {
        public TNode Result { get; set; }
        public int NewPosition { get; set; }
    }

    public struct Optional<T>
    {
        public T Value { get; set; }
        public bool HasValue { get; set; }
    }

    public delegate ParserOutput<TNode> Parser<TNode, TToken>(ParserInput<TToken> input);
}
